FROM alpine:3.8

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories

ARG DOCKER_IMAGE_TAG
ENV EXEC_VERSION=$DOCKER_IMAGE_TAG

# https://wiki.alpinelinux.org/wiki/Running_glibc_programs
# https://pkgs.alpinelinux.org/packages?name=gcompat&branch=v3.8&repo=&arch=&maintainer=
RUN set -eux; \
	apk add --no-cache \
		gcompat \
	;

ADD otel-agent-golang /root

CMD ["/root/otel-agent-golang"]
